/* flex */
.flx-center {
	display: flex;
	align-items: center;
	justify-content: center;
}
.flx-justify-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.flx-align-center {
	display: flex;
	align-items: center;
}

/* clearfix */
.clearfix::after {
	display: block;
	height: 0;
	overflow: hidden;
	clear: both;
	content: "";
}

/* 文字单行省略号 */
.sle {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* 文字多了自動換行 */
.break-word {
	word-break: break-all;
	word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
	transition: all 0.2s;
}
.fade-transform-enter-from {
	opacity: 0;
	transition: all 0.2s;
	transform: translateX(-30px);
}
.fade-transform-leave-to {
	opacity: 0;
	transition: all 0.2s;
	transform: translateX(30px);
}

/* Breadcrumb */
.breadcrumb-enter-active {
	transition: all 0.2s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
	opacity: 0;
	transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
	width: 0;
	height: 8px;
}
::-webkit-scrollbar-thumb {
	background-color: #d3d3d3;
	border-radius: 20px;
	box-shadow: inset 0 0 0 white;
}

/* nprogress样式 */
#nprogress .bar {
	background: var(--el-color-primary) !important;
}
#nprogress .spinner-icon {
	border-top-color: var(--el-color-primary) !important;
	border-left-color: var(--el-color-primary) !important;
}
#nprogress .peg {
	box-shadow: 0 0 10px var(--el-color-primary), 0 0 5px var(--el-color-primary) !important;
}

/* 外边距、内边距全局样式 */
@for $i from 0 through 40 {
	.mt#{$i} {
		margin-top: #{$i}px !important;
	}
	.mr#{$i} {
		margin-right: #{$i}px !important;
	}
	.mb#{$i} {
		margin-bottom: #{$i}px !important;
	}
	.ml#{$i} {
		margin-left: #{$i}px !important;
	}
	.pt#{$i} {
		padding-top: #{$i}px !important;
	}
	.pr#{$i} {
		padding-right: #{$i}px !important;
	}
	.pb#{$i} {
		padding-bottom: #{$i}px !important;
	}
	.pl#{$i} {
		padding-left: #{$i}px !important;
	}
}

// scss 全局变量

// 响应式布局
@mixin changeWidth($maxWidth: 1200px) {
	.container {
		max-width: $maxWidth;
	}
}

// 首次调用
@include changeWidth;

/* 小于1380px时 */
@media (max-width: 1380px) {
	.el-radio-group {
		justify-content: center !important;
	}
}

/* 小于1200px时 */
@media (max-width: 1200px) {
	@include changeWidth($maxWidth: 1000px);
}

/* 小于992px时 */
@media (max-width: 992px) {
	@include changeWidth($maxWidth: 900px);
}

/* 小于720px时 */
@media (max-width: 720px) {
	// 隐藏元素
	.xs-hidden {
		display: none;
	}
}

/*
作者: imsyy
主页：https://www.imsyy.top/
GitHub：https://github.com/imsyy/home
版权所有，请勿删除
*/

/* 全局样式 */
html,
body {
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: "HarmonyOS_Regular", sans-serif;
	background-color: #333333;
}
*,
a,
p {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	color: #ffffff;
	text-decoration: none;
	user-select: none;
	-webkit-user-drag: none;
	&:hover {
		transition: 0.3s;
	}
}

// 字体文件
@font-face {
	font-family: Pacifico-Regular;
	src: url("../assets/fonts/Pacifico-Regular.ttf") format("truetype");
}

@font-face {
	font-family: UnidreamLED;
	src: url("../assets/fonts/UnidreamLED.ttf") format("truetype");
}

// 基础样式
#app {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 0;
	width: 100vw;
	height: 100vh;
}

// 卡片样式
.cards {
	background: #00000040;
	border-radius: 6px;
	transition: all 0.3s;
	transform: scale(1);
	backdrop-filter: blur(10px);
}
.cards:hover {
	transform: scale(1.01);
}
.cards:active {
	transform: scale(0.98);
}

// 文字超出
.text-hidden {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

// 弹窗样式
.el-message {
	--el-message-bg-color: #00000040 !important;
	--el-message-text-color: #efefef !important;

	border-color: transparent !important;
	border-radius: 25px !important;
	backdrop-filter: blur(10px);
	.el-message__badge {
		display: none;
	}
}

// 进度条样式
.el-progress-bar {
	.el-progress-bar__outer {
		background-color: #00000020;
		border-radius: 6px;
		.el-progress-bar__inner {
			font-family: UnidreamLED;
			text-align: center;
			background-color: #efefef;
			border-radius: 6px;
			span {
				font-size: 0.9rem;
				color: #564d59;
			}
		}
	}
}

// Tooltip 样式
.el-popper.is-dark {
	background: #ffffff60 !important;
	border: 1px solid transparent !important;
}

// 卡片样式
.el-card {
	background-color: transparent !important;
	border: 1px solid transparent !important;
	border-radius: 8px !important;
	.el-card__header {
		padding: 16px 20px !important;
		font-weight: bold;
		background-color: #ffffff30 !important;
		border-bottom: 1px solid transparent !important;
	}
	.el-card__body {
		padding: 0 !important;
		background-color: #ffffff10 !important;
	}
}

// 渐入动画
@keyframes fade {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

// 隐藏元素
@media (min-width: 910px) and (max-width: 1200px) {
	.sm-hidden {
		display: none;
	}
}

// 自定义鼠标
#cursor {
	position: fixed;
	z-index: 10086;
	width: 18px;
	height: 18px;
	pointer-events: none;
	background: #ffffff;
	border-radius: 25px;
	opacity: 0.25;
	transition: 0.2s ease-in-out;
	transition-property: background, opacity, transform;
	&.hidden {
		opacity: 0;
	}
	&.active {
		opacity: 0.5;
		transform: scale(0.5);
	}
}

// 滚动条样式
::-webkit-scrollbar,
scrollbar {
	width: 6px;
	height: 6px;
	background-color: transparent;
}
::-webkit-scrollbar-thumb,
scrollbar-thumb {
	background-color: #eeeeee;
	border-radius: 10px;
}
